<%--
  Created by IntelliJ IDEA.
  User: zhongge
  Date: 2025/8/16
  Time: 0:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>添加学生</title>
    <style>
        .container { width: 50%; margin: 20px auto; }
        .form-group { margin-bottom: 15px; }
        label { display: inline-block; width: 100px; }
        input, select, textarea { width: 300px; padding: 5px; }
        .btn { padding: 8px 15px; background-color: #4CAF50; color: white; border: none; border-radius: 3px; cursor: pointer; }
        .back-btn { background-color: #ccc; color: #000; margin-left: 10px; }
        h1 { text-align: center; }
    </style>
</head>
<body>
<div class="container">
    <h1>添加新学生</h1>
    <form action="${pageContext.request.contextPath}/add" method="post">
        <div class="form-group">
            <label for="name">姓名：</label>
            <input type="text" id="name" name="name" required>
        </div>

        <div class="form-group">
            <label for="age">年龄：</label>
            <input type="number" id="age" name="age" min="0" required>
        </div>

        <div class="form-group">
            <label for="sex">性别：</label>
            <select id="sex" name="sex" required>
                <option value="1">男</option>
                <option value="0">女</option>
            </select>
        </div>

        <div class="form-group">
            <label for="birthday">生日：</label>
            <input type="date" id="birthday" name="birthday" required>
        </div>

        <div class="form-group">
            <label for="address">地址：</label>
            <input type="text" id="address" name="address" required>
        </div>

        <div class="form-group">
            <label for="remark">备注：</label>
            <textarea id="remark" name="remark" rows="3"></textarea>
        </div>

        <div class="form-group">
            <label></label>
            <input type="submit" value="提交" class="btn">
            <a href="${pageContext.request.contextPath}/list" class="btn back-btn">返回列表</a>
        </div>
    </form>
</div>
</body>
</html>

